package com.open.capacity.employee.service;

import com.open.capacity.common.exception.service.ServiceException;
import com.open.capacity.common.web.PageResult;
import com.open.capacity.common.web.Result;
import com.open.capacity.employee.model.EmployeeModel;
import com.open.capacity.employee.model.Information;
import com.open.capacity.employee.model.InformationModel;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

@Service
public interface EmpinformationService {
    /**
     * 添加面试人员
     *
     * @param information
     */
    void addSysUser(Information information) throws ServiceException;

    Result picture(MultipartFile file) throws ServiceException;


//    LoginAppUser findByUsername(String username)  throws ServiceException;
//
//    LoginAppUser findByMobile(String mobile)  throws ServiceException;

    Information findById(Long id) throws ServiceException;

    /**
     * 更新密码
     *
     * @param id
     * @param oldPassword
     * @param newPassword
     * @return
     */
    Result updatePassword(Long id, String oldPassword, String newPassword) throws ServiceException;
//    Result updatePassword(Long id, Object o, String newPassword);

    /**
     * 修改面试人员
     *
     * @param information
     */
    Information updateSysUser(Information information) throws ServiceException;

    /**
     * 专职人员列表
     *
     * @param params
     * @return
     */
    PageResult<Information> findUsers(Map<String, Object> params) throws ServiceException;

    /**
     * 状态变更
     *
     * @param params
     * @return
     */
    Result updateEnabled(Map<String, Object> params) throws ServiceException;

    /**
     * 更新
     *
     * @param information
     * @return
     */
    Result saveOrUpdate(Information information) throws ServiceException;

    /**
     * 查询全部面试人员
     *
     * @param params
     * @return
     */
    List<InformationModel> findAllUsers(Map<String, Object> params) throws ServiceException;

    void deleteUser(Long id) throws ServiceException;
}
